<template>
	<view class="content">
		<view class="title">
			{{messageInfo.name}}
		</view>
		<view class="date" v-if="messageInfo.date">
			{{messageInfo.date}}
		</view>
		<view class="date" v-if="messageInfo.msg_create_date">
			{{messageInfo.msg_create_date}}
		</view>
		<view class="content_content" v-if="messageInfo.content">
			{{messageInfo.content}}
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				messageInfo: ''
			}
		},
		onShow() {
			this.messageInfo = JSON.parse(uni.getStorageSync('messageDetail'))
			this.messageInfo.content = this.messageInfo.content.replace(/\\n/g, " ")
			if(this.messageInfo.content){
				uni.setNavigationBarTitle({
				    title: '系统通知'
				});
			}else{
				uni.setNavigationBarTitle({
				    title: '提醒'
				});
			}
		},
		methods: {}
	}
</script>

<style lang="less" scoped>
	.content {
		padding: 0 40rpx;
		.title {
			text-align: center;
			font-size: 34rpx;
			font-weight: bold;
			color: #181818;
			padding: 48rpx 0rpx 14rpx;
		}

		.content_content {
			text-indent: 2em;
			font-size: 30rpx;
			color: #666666;
			line-height: 48rpx;
			letter-spacing: 1rpx;
			margin-top: 32rpx;
		}

		.date {
			font-size: 26rpx;
			color: #999999;
		}
	}
</style>
